#include <stdio.h>
#include <pthread.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>

int main()
{
	pid_t pid;  //定义进程id变量
	pthread_t tid;  //定义线程id变量

	pid = getpid();  //获取进程id
	tid = pthread_self();  //获取线程id	
	
	printf("进程id is %u, 线程id is %x\n",pid,tid);
}


